import { IsNumber, IsOptional, IsString, IsUrl, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class UpdateUserByTokenDto {
  @ApiProperty({
    description: '昵称',
    required: false,
  })
  @IsOptional()
  @IsString()
  nickname?: string;

  @ApiProperty({
    description: '手机号',
    required: false,
  })
  @IsOptional()
  @IsString()
  @Length(11)
  phone?: number;

  @ApiProperty({
    description: '头像',
    required: false,
  })
  @IsOptional()
  @IsString()
  avatar?: string;
}
